n = int(input())

num1,num2 = 0,0
for i in range(n):
    cnt = int(input())
    if cnt>=60:
        num1 += 1
    if cnt>=85:
        num2 += 1

print("{}%".format(round(100*num1/n)))
print("{}%".format(round(100*num2/n)))
